Skip to content

Preserve caller repo identity during project init - #43

Merged
VladimirBrejcha merged 1 commit into
mainfrom
codex/rr25-project-init-cwd
Sep 1, 2026
Merged

Preserve caller repo identity during project init#43
VladimirBrejcha merged 1 commit into
mainfrom
codex/rr25-project-init-cwd

Conversation

@VladimirBrejcha

Copy link
Copy Markdown
Contributor

What changed

Resolve the project file and repository root once in the CLI caller before direct or service-backed project init dispatch. This prevents a resident brokerd launched elsewhere from combining its own working directory with the caller-local project file.

Add a disposable regression that launches the service from one directory and runs the documented no-flag newcomer command from a different fresh repo. It verifies the response, generated project identity, known-project registration, repeat-init recovery, next capacity lookup, and an aligned explicit repo-root/project-file pair. The public capacity response continues to redact the absolute root intentionally.

The failure required interacting conditions: an omitted repo-root, a caller-resolved project file, and a long-lived service with a different cwd. The fix removes that coupling at the existing request boundary without adding retries or another discovery layer.

Closes #42.

How you verified

  • node --test --test-name-pattern "project init keeps caller repo identity" client/test/simbroker.test.mjs
  • npm run test:client (258 passed)
  • full npm test, agent-harness build, and 113 harness tests through the implementation profile
  • spec-only profile, including 51 public-front-door tests and 10 instruction-contract tests
  • repository public-surface scan and staged current-source audit
  • I did not commit private paths, credentials, generated Xcode projects, local broker state, or task-session artifacts

Notes

This project is Alpha, macOS-only, and needs Xcode to talk to iOS Simulators. See CONTRIBUTING.md.

Why:
A resident brokerd could combine its own launch directory with a caller-local project file and return or register the wrong repository identity.

Changed:
Resolve the project file and repository root once in the CLI caller, add a disposable resident-service regression, and publish the caller-context contract with verifier bindings.

Verification:
Focused project-init regression passed; npm run test:client passed 258 tests; implementation and spec-only agent profiles passed; public-source candidate checks passed.

Affected:
client/command-dispatch.mjs, client/test/simbroker.test.mjs, spec/global-simulator-broker.md, spec/build-and-test.md

Refs:
#42

Session:
task-sessions/rr25-project-init-cwd-20260901
@VladimirBrejcha VladimirBrejcha added the autopilot:on Enable Autopilot processing for this PR label Sep 1, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T07:09:03.106208Z 72202f1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@fiveonecode-autopilot

Copy link
Copy Markdown

Reviewed top-level PR feedback and left the current code unchanged.

These items were posted as PR review bodies or conversation comments rather than unresolved review threads, so this acknowledgement is recorded on the PR timeline.

@VladimirBrejcha
VladimirBrejcha merged commit e1c15fd into main Sep 1, 2026
2 checks passed
@VladimirBrejcha
VladimirBrejcha deleted the codex/rr25-project-init-cwd branch September 1, 2026 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autopilot:on Enable Autopilot processing for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

project init uses brokerd launch directory for repository identity

1 participant